//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//

package com.itheima.pinda.authority.entity.core;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.itheima.pinda.base.entity.Entity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotEmpty;
import java.time.LocalDateTime;

@TableName("pd_core_org")
@ApiModel(
        value = "Org",
        description = "组织"
)
public class Org extends Entity<Long> {
    private static final long serialVersionUID = 1L;
    @ApiModelProperty("名称")
    @NotEmpty(
            message = "名称不能为空"
    )
    @Length(
            max = 255,
            message = "名称长度不能超过255"
    )
    @TableField(
            value = "name",
            condition = "%s LIKE CONCAT('%%',#{%s},'%%')"
    )
    private String name;
    @ApiModelProperty("简称")
    @Length(
            max = 255,
            message = "简称长度不能超过255"
    )
    @TableField(
            value = "abbreviation",
            condition = "%s LIKE CONCAT('%%',#{%s},'%%')"
    )
    private String abbreviation;
    @ApiModelProperty("父级ID")
    @TableField("parent_id")
    private Long parentId;
    @ApiModelProperty("父级名称")
    @TableField(
            exist = false
    )
    private String parentName;
    @ApiModelProperty("部门类型 1为分公司，2为一级转运中心 3为二级转运中心 4为网点")
    @TableField("org_type")
    private Integer orgType;
    @ApiModelProperty("所属省份id")
    @TableField("province_id")
    private Long provinceId;
    @ApiModelProperty("所属省份名称")
    @TableField(
            exist = false
    )
    private String provinceName;
    @ApiModelProperty("所属城市id")
    @TableField("city_id")
    private Long cityId;
    @ApiModelProperty("所属城市名称")
    @TableField(
            exist = false
    )
    private String cityName;
    @ApiModelProperty("所属区县id")
    @TableField("county_id")
    private Long countyId;
    @ApiModelProperty("所属区县名称")
    @TableField(
            exist = false
    )
    private String countyName;
    @ApiModelProperty("详细地址")
    @Length(
            max = 255,
            message = "详细地址长度不能超过255"
    )
    @TableField(
            value = "address",
            condition = "%s LIKE CONCAT('%%',#{%s},'%%')"
    )
    private String address;
    @ApiModelProperty("经度")
    @Length(
            max = 255,
            message = "经度长度不能超过255"
    )
    @TableField(
            value = "longitude",
            condition = "%s LIKE CONCAT('%%',#{%s},'%%')"
    )
    private String longitude;
    @ApiModelProperty("纬度")
    @Length(
            max = 255,
            message = "纬度长度不能超过255"
    )
    @TableField(
            value = "latitude",
            condition = "%s LIKE CONCAT('%%',#{%s},'%%')"
    )
    private String latitude;
    @ApiModelProperty("联系电话")
    @Length(
            max = 255,
            message = "联系电话长度不能超过255"
    )
    @TableField(
            value = "contract_number",
            condition = "%s LIKE CONCAT('%%',#{%s},'%%')"
    )
    private String contractNumber;
    @ApiModelProperty("负责人id")
    @TableField("manager_id")
    private Long managerId;
    @ApiModelProperty("负责人名称")
    @TableField(
            exist = false
    )
    private String manager;
    @ApiModelProperty("营业时间")
    @Length(
            max = 255,
            message = "营业时间长度不能超过255"
    )
    @TableField(
            value = "business_hours",
            condition = "%s LIKE CONCAT('%%',#{%s},'%%')"
    )
    private String businessHours;
    @ApiModelProperty("树结构")
    @Length(
            max = 255,
            message = "树结构长度不能超过255"
    )
    @TableField(
            value = "tree_path",
            condition = "%s LIKE CONCAT('%%',#{%s},'%%')"
    )
    private String treePath;
    @ApiModelProperty("排序")
    @TableField("sort_value")
    private Integer sortValue;
    @ApiModelProperty("状态")
    @TableField("status")
    private Boolean status;
    @ApiModelProperty("描述")
    @Length(
            max = 255,
            message = "描述长度不能超过255"
    )
    @TableField(
            value = "describe_",
            condition = "%s LIKE CONCAT('%%',#{%s},'%%')"
    )
    private String describe;

    public Org(Long id, LocalDateTime createTime, Long createUser, LocalDateTime updateTime, Long updateUser, String name, String abbreviation, Long parentId, String treePath, Integer sortValue, Boolean status, String describe, Integer orgType, Long provinceId, Long cityId, Long countyId, String address, String longitude, String latitude, String contractNumber) {
        this.id = id;
        this.createTime = createTime;
        this.createUser = createUser;
        this.updateTime = updateTime;
        this.updateUser = updateUser;
        this.name = name;
        this.abbreviation = abbreviation;
        this.parentId = parentId;
        this.treePath = treePath;
        this.sortValue = sortValue;
        this.status = status;
        this.describe = describe;
        this.orgType = orgType;
        this.provinceId = provinceId;
        this.cityId = cityId;
        this.countyId = countyId;
        this.address = address;
        this.longitude = longitude;
        this.latitude = latitude;
        this.contractNumber = contractNumber;
    }

    public static Org.OrgBuilder builder() {
        return new Org.OrgBuilder();
    }

    public String getName() {
        return this.name;
    }

    public String getAbbreviation() {
        return this.abbreviation;
    }

    public Long getParentId() {
        return this.parentId;
    }

    public String getParentName() {
        return this.parentName;
    }

    public Integer getOrgType() {
        return this.orgType;
    }

    public Long getProvinceId() {
        return this.provinceId;
    }

    public String getProvinceName() {
        return this.provinceName;
    }

    public Long getCityId() {
        return this.cityId;
    }

    public String getCityName() {
        return this.cityName;
    }

    public Long getCountyId() {
        return this.countyId;
    }

    public String getCountyName() {
        return this.countyName;
    }

    public String getAddress() {
        return this.address;
    }

    public String getLongitude() {
        return this.longitude;
    }

    public String getLatitude() {
        return this.latitude;
    }

    public String getContractNumber() {
        return this.contractNumber;
    }

    public Long getManagerId() {
        return this.managerId;
    }

    public String getManager() {
        return this.manager;
    }

    public String getBusinessHours() {
        return this.businessHours;
    }

    public String getTreePath() {
        return this.treePath;
    }

    public Integer getSortValue() {
        return this.sortValue;
    }

    public Boolean getStatus() {
        return this.status;
    }

    public String getDescribe() {
        return this.describe;
    }

    public Org setName(final String name) {
        this.name = name;
        return this;
    }

    public Org setAbbreviation(final String abbreviation) {
        this.abbreviation = abbreviation;
        return this;
    }

    public Org setParentId(final Long parentId) {
        this.parentId = parentId;
        return this;
    }

    public Org setParentName(final String parentName) {
        this.parentName = parentName;
        return this;
    }

    public Org setOrgType(final Integer orgType) {
        this.orgType = orgType;
        return this;
    }

    public Org setProvinceId(final Long provinceId) {
        this.provinceId = provinceId;
        return this;
    }

    public Org setProvinceName(final String provinceName) {
        this.provinceName = provinceName;
        return this;
    }

    public Org setCityId(final Long cityId) {
        this.cityId = cityId;
        return this;
    }

    public Org setCityName(final String cityName) {
        this.cityName = cityName;
        return this;
    }

    public Org setCountyId(final Long countyId) {
        this.countyId = countyId;
        return this;
    }

    public Org setCountyName(final String countyName) {
        this.countyName = countyName;
        return this;
    }

    public Org setAddress(final String address) {
        this.address = address;
        return this;
    }

    public Org setLongitude(final String longitude) {
        this.longitude = longitude;
        return this;
    }

    public Org setLatitude(final String latitude) {
        this.latitude = latitude;
        return this;
    }

    public Org setContractNumber(final String contractNumber) {
        this.contractNumber = contractNumber;
        return this;
    }

    public Org setManagerId(final Long managerId) {
        this.managerId = managerId;
        return this;
    }

    public Org setManager(final String manager) {
        this.manager = manager;
        return this;
    }

    public Org setBusinessHours(final String businessHours) {
        this.businessHours = businessHours;
        return this;
    }

    public Org setTreePath(final String treePath) {
        this.treePath = treePath;
        return this;
    }

    public Org setSortValue(final Integer sortValue) {
        this.sortValue = sortValue;
        return this;
    }

    public Org setStatus(final Boolean status) {
        this.status = status;
        return this;
    }

    public Org setDescribe(final String describe) {
        this.describe = describe;
        return this;
    }

    public Org() {
    }

    public Org(final String name, final String abbreviation, final Long parentId, final String parentName, final Integer orgType, final Long provinceId, final String provinceName, final Long cityId, final String cityName, final Long countyId, final String countyName, final String address, final String longitude, final String latitude, final String contractNumber, final Long managerId, final String manager, final String businessHours, final String treePath, final Integer sortValue, final Boolean status, final String describe) {
        this.name = name;
        this.abbreviation = abbreviation;
        this.parentId = parentId;
        this.parentName = parentName;
        this.orgType = orgType;
        this.provinceId = provinceId;
        this.provinceName = provinceName;
        this.cityId = cityId;
        this.cityName = cityName;
        this.countyId = countyId;
        this.countyName = countyName;
        this.address = address;
        this.longitude = longitude;
        this.latitude = latitude;
        this.contractNumber = contractNumber;
        this.managerId = managerId;
        this.manager = manager;
        this.businessHours = businessHours;
        this.treePath = treePath;
        this.sortValue = sortValue;
        this.status = status;
        this.describe = describe;
    }

    @Override
    public String toString() {
        return "Org(super=" + super.toString() + ", name=" + this.getName() + ", abbreviation=" + this.getAbbreviation() + ", parentId=" + this.getParentId() + ", parentName=" + this.getParentName() + ", orgType=" + this.getOrgType() + ", provinceId=" + this.getProvinceId() + ", provinceName=" + this.getProvinceName() + ", cityId=" + this.getCityId() + ", cityName=" + this.getCityName() + ", countyId=" + this.getCountyId() + ", countyName=" + this.getCountyName() + ", address=" + this.getAddress() + ", longitude=" + this.getLongitude() + ", latitude=" + this.getLatitude() + ", contractNumber=" + this.getContractNumber() + ", managerId=" + this.getManagerId() + ", manager=" + this.getManager() + ", businessHours=" + this.getBusinessHours() + ", treePath=" + this.getTreePath() + ", sortValue=" + this.getSortValue() + ", status=" + this.getStatus() + ", describe=" + this.getDescribe() + ")";
    }

    @Override
    public boolean equals(final Object o) {
        if (o == this) {
            return true;
        } else if (!(o instanceof Org)) {
            return false;
        } else {
            Org other = (Org)o;
            if (!other.canEqual(this)) {
                return false;
            } else if (!super.equals(o)) {
                return false;
            } else {
                Object this$name = this.getName();
                Object other$name = other.getName();
                if (this$name == null) {
                    if (other$name != null) {
                        return false;
                    }
                } else if (!this$name.equals(other$name)) {
                    return false;
                }

                Object this$abbreviation = this.getAbbreviation();
                Object other$abbreviation = other.getAbbreviation();
                if (this$abbreviation == null) {
                    if (other$abbreviation != null) {
                        return false;
                    }
                } else if (!this$abbreviation.equals(other$abbreviation)) {
                    return false;
                }

                label263: {
                    Object this$parentId = this.getParentId();
                    Object other$parentId = other.getParentId();
                    if (this$parentId == null) {
                        if (other$parentId == null) {
                            break label263;
                        }
                    } else if (this$parentId.equals(other$parentId)) {
                        break label263;
                    }

                    return false;
                }

                label256: {
                    Object this$parentName = this.getParentName();
                    Object other$parentName = other.getParentName();
                    if (this$parentName == null) {
                        if (other$parentName == null) {
                            break label256;
                        }
                    } else if (this$parentName.equals(other$parentName)) {
                        break label256;
                    }

                    return false;
                }

                Object this$orgType = this.getOrgType();
                Object other$orgType = other.getOrgType();
                if (this$orgType == null) {
                    if (other$orgType != null) {
                        return false;
                    }
                } else if (!this$orgType.equals(other$orgType)) {
                    return false;
                }

                Object this$provinceId = this.getProvinceId();
                Object other$provinceId = other.getProvinceId();
                if (this$provinceId == null) {
                    if (other$provinceId != null) {
                        return false;
                    }
                } else if (!this$provinceId.equals(other$provinceId)) {
                    return false;
                }

                label235: {
                    Object this$provinceName = this.getProvinceName();
                    Object other$provinceName = other.getProvinceName();
                    if (this$provinceName == null) {
                        if (other$provinceName == null) {
                            break label235;
                        }
                    } else if (this$provinceName.equals(other$provinceName)) {
                        break label235;
                    }

                    return false;
                }

                Object this$cityId = this.getCityId();
                Object other$cityId = other.getCityId();
                if (this$cityId == null) {
                    if (other$cityId != null) {
                        return false;
                    }
                } else if (!this$cityId.equals(other$cityId)) {
                    return false;
                }

                Object this$cityName = this.getCityName();
                Object other$cityName = other.getCityName();
                if (this$cityName == null) {
                    if (other$cityName != null) {
                        return false;
                    }
                } else if (!this$cityName.equals(other$cityName)) {
                    return false;
                }

                label214: {
                    Object this$countyId = this.getCountyId();
                    Object other$countyId = other.getCountyId();
                    if (this$countyId == null) {
                        if (other$countyId == null) {
                            break label214;
                        }
                    } else if (this$countyId.equals(other$countyId)) {
                        break label214;
                    }

                    return false;
                }

                label207: {
                    Object this$countyName = this.getCountyName();
                    Object other$countyName = other.getCountyName();
                    if (this$countyName == null) {
                        if (other$countyName == null) {
                            break label207;
                        }
                    } else if (this$countyName.equals(other$countyName)) {
                        break label207;
                    }

                    return false;
                }

                label200: {
                    Object this$address = this.getAddress();
                    Object other$address = other.getAddress();
                    if (this$address == null) {
                        if (other$address == null) {
                            break label200;
                        }
                    } else if (this$address.equals(other$address)) {
                        break label200;
                    }

                    return false;
                }

                Object this$longitude = this.getLongitude();
                Object other$longitude = other.getLongitude();
                if (this$longitude == null) {
                    if (other$longitude != null) {
                        return false;
                    }
                } else if (!this$longitude.equals(other$longitude)) {
                    return false;
                }

                label186: {
                    Object this$latitude = this.getLatitude();
                    Object other$latitude = other.getLatitude();
                    if (this$latitude == null) {
                        if (other$latitude == null) {
                            break label186;
                        }
                    } else if (this$latitude.equals(other$latitude)) {
                        break label186;
                    }

                    return false;
                }

                Object this$contractNumber = this.getContractNumber();
                Object other$contractNumber = other.getContractNumber();
                if (this$contractNumber == null) {
                    if (other$contractNumber != null) {
                        return false;
                    }
                } else if (!this$contractNumber.equals(other$contractNumber)) {
                    return false;
                }

                label172: {
                    Object this$managerId = this.getManagerId();
                    Object other$managerId = other.getManagerId();
                    if (this$managerId == null) {
                        if (other$managerId == null) {
                            break label172;
                        }
                    } else if (this$managerId.equals(other$managerId)) {
                        break label172;
                    }

                    return false;
                }

                Object this$manager = this.getManager();
                Object other$manager = other.getManager();
                if (this$manager == null) {
                    if (other$manager != null) {
                        return false;
                    }
                } else if (!this$manager.equals(other$manager)) {
                    return false;
                }

                Object this$businessHours = this.getBusinessHours();
                Object other$businessHours = other.getBusinessHours();
                if (this$businessHours == null) {
                    if (other$businessHours != null) {
                        return false;
                    }
                } else if (!this$businessHours.equals(other$businessHours)) {
                    return false;
                }

                label151: {
                    Object this$treePath = this.getTreePath();
                    Object other$treePath = other.getTreePath();
                    if (this$treePath == null) {
                        if (other$treePath == null) {
                            break label151;
                        }
                    } else if (this$treePath.equals(other$treePath)) {
                        break label151;
                    }

                    return false;
                }

                label144: {
                    Object this$sortValue = this.getSortValue();
                    Object other$sortValue = other.getSortValue();
                    if (this$sortValue == null) {
                        if (other$sortValue == null) {
                            break label144;
                        }
                    } else if (this$sortValue.equals(other$sortValue)) {
                        break label144;
                    }

                    return false;
                }

                Object this$status = this.getStatus();
                Object other$status = other.getStatus();
                if (this$status == null) {
                    if (other$status != null) {
                        return false;
                    }
                } else if (!this$status.equals(other$status)) {
                    return false;
                }

                Object this$describe = this.getDescribe();
                Object other$describe = other.getDescribe();
                if (this$describe == null) {
                    if (other$describe != null) {
                        return false;
                    }
                } else if (!this$describe.equals(other$describe)) {
                    return false;
                }

                return true;
            }
        }
    }

    protected boolean canEqual(final Object other) {
        return other instanceof Org;
    }

    @Override
    public int hashCode() {
        /*int PRIME = true;*/
        int result = super.hashCode();
        Object $name = this.getName();
        result = result * 59 + ($name == null ? 43 : $name.hashCode());
        Object $abbreviation = this.getAbbreviation();
        result = result * 59 + ($abbreviation == null ? 43 : $abbreviation.hashCode());
        Object $parentId = this.getParentId();
        result = result * 59 + ($parentId == null ? 43 : $parentId.hashCode());
        Object $parentName = this.getParentName();
        result = result * 59 + ($parentName == null ? 43 : $parentName.hashCode());
        Object $orgType = this.getOrgType();
        result = result * 59 + ($orgType == null ? 43 : $orgType.hashCode());
        Object $provinceId = this.getProvinceId();
        result = result * 59 + ($provinceId == null ? 43 : $provinceId.hashCode());
        Object $provinceName = this.getProvinceName();
        result = result * 59 + ($provinceName == null ? 43 : $provinceName.hashCode());
        Object $cityId = this.getCityId();
        result = result * 59 + ($cityId == null ? 43 : $cityId.hashCode());
        Object $cityName = this.getCityName();
        result = result * 59 + ($cityName == null ? 43 : $cityName.hashCode());
        Object $countyId = this.getCountyId();
        result = result * 59 + ($countyId == null ? 43 : $countyId.hashCode());
        Object $countyName = this.getCountyName();
        result = result * 59 + ($countyName == null ? 43 : $countyName.hashCode());
        Object $address = this.getAddress();
        result = result * 59 + ($address == null ? 43 : $address.hashCode());
        Object $longitude = this.getLongitude();
        result = result * 59 + ($longitude == null ? 43 : $longitude.hashCode());
        Object $latitude = this.getLatitude();
        result = result * 59 + ($latitude == null ? 43 : $latitude.hashCode());
        Object $contractNumber = this.getContractNumber();
        result = result * 59 + ($contractNumber == null ? 43 : $contractNumber.hashCode());
        Object $managerId = this.getManagerId();
        result = result * 59 + ($managerId == null ? 43 : $managerId.hashCode());
        Object $manager = this.getManager();
        result = result * 59 + ($manager == null ? 43 : $manager.hashCode());
        Object $businessHours = this.getBusinessHours();
        result = result * 59 + ($businessHours == null ? 43 : $businessHours.hashCode());
        Object $treePath = this.getTreePath();
        result = result * 59 + ($treePath == null ? 43 : $treePath.hashCode());
        Object $sortValue = this.getSortValue();
        result = result * 59 + ($sortValue == null ? 43 : $sortValue.hashCode());
        Object $status = this.getStatus();
        result = result * 59 + ($status == null ? 43 : $status.hashCode());
        Object $describe = this.getDescribe();
        result = result * 59 + ($describe == null ? 43 : $describe.hashCode());
        return result;
    }

    public static class OrgBuilder {
        private Long id;
        private LocalDateTime createTime;
        private Long createUser;
        private LocalDateTime updateTime;
        private Long updateUser;
        private String name;
        private String abbreviation;
        private Long parentId;
        private String treePath;
        private Integer sortValue;
        private Boolean status;
        private String describe;
        private Integer orgType;
        private Long provinceId;
        private Long cityId;
        private Long countyId;
        private String address;
        private String longitude;
        private String latitude;
        private String contractNumber;

        OrgBuilder() {
        }

        public Org.OrgBuilder id(final Long id) {
            this.id = id;
            return this;
        }

        public Org.OrgBuilder createTime(final LocalDateTime createTime) {
            this.createTime = createTime;
            return this;
        }

        public Org.OrgBuilder createUser(final Long createUser) {
            this.createUser = createUser;
            return this;
        }

        public Org.OrgBuilder updateTime(final LocalDateTime updateTime) {
            this.updateTime = updateTime;
            return this;
        }

        public Org.OrgBuilder updateUser(final Long updateUser) {
            this.updateUser = updateUser;
            return this;
        }

        public Org.OrgBuilder name(final String name) {
            this.name = name;
            return this;
        }

        public Org.OrgBuilder abbreviation(final String abbreviation) {
            this.abbreviation = abbreviation;
            return this;
        }

        public Org.OrgBuilder parentId(final Long parentId) {
            this.parentId = parentId;
            return this;
        }

        public Org.OrgBuilder treePath(final String treePath) {
            this.treePath = treePath;
            return this;
        }

        public Org.OrgBuilder sortValue(final Integer sortValue) {
            this.sortValue = sortValue;
            return this;
        }

        public Org.OrgBuilder status(final Boolean status) {
            this.status = status;
            return this;
        }

        public Org.OrgBuilder describe(final String describe) {
            this.describe = describe;
            return this;
        }

        public Org.OrgBuilder orgType(final Integer orgType) {
            this.orgType = orgType;
            return this;
        }

        public Org.OrgBuilder provinceId(final Long provinceId) {
            this.provinceId = provinceId;
            return this;
        }

        public Org.OrgBuilder cityId(final Long cityId) {
            this.cityId = cityId;
            return this;
        }

        public Org.OrgBuilder countyId(final Long countyId) {
            this.countyId = countyId;
            return this;
        }

        public Org.OrgBuilder address(final String address) {
            this.address = address;
            return this;
        }

        public Org.OrgBuilder longitude(final String longitude) {
            this.longitude = longitude;
            return this;
        }

        public Org.OrgBuilder latitude(final String latitude) {
            this.latitude = latitude;
            return this;
        }

        public Org.OrgBuilder contractNumber(final String contractNumber) {
            this.contractNumber = contractNumber;
            return this;
        }

        public Org build() {
            return new Org(this.id, this.createTime, this.createUser, this.updateTime, this.updateUser, this.name, this.abbreviation, this.parentId, this.treePath, this.sortValue, this.status, this.describe, this.orgType, this.provinceId, this.cityId, this.countyId, this.address, this.longitude, this.latitude, this.contractNumber);
        }

/*        public String toString() {
            return "Org.OrgBuilder(id=" + this.id + ", createTime=" + this.createTime + ", createUser=" + this.createUser + ", updateTime=" + this.updateTime + ", updateUser=" + this.updateUser + ", name=" + this.name + ", abbreviation=" + this.abbreviation + ", parentId=" + this.parentId + ", treePath=" + this.treePath + ", sortValue=" + this.sortValue + ", status=" + this.status + ", describe=" + this.describe + ", orgType=" + this.orgType + ", provinceId=" + this.provinceId + ", cityId=" + this.cityId + ", countyId=" + this.countyId + ", address=" + this.address + ", longitude=" + this.longitude + ", latitude=" + this.latitude + ", contractNumber=" + this.contractNumber + ")";
        }*/
    }
}
